<?php
/**
 * recent.ptml
 * 
 * @category    DikDikTheme
 * @package     View
 */
?>
<div class="recent-posts">
    <h2>Recent Posts</h2>
    
        <?php $col = 3; ?>
        <?php for($x = 0; $x < $col; $x++) : ?>

        <ul class="list col_<?php echo $x; ?>">

            <?php $y = $x; ?>
            <?php while ($y < count($this->posts)) : ?>
            <?php $post = $this->posts->seek($y)->current(); ?>
    
            <li>
                <h3>
                    <a href="<?php echo $this->url(array('slug' => $post->slug), 'post_read'); ?>">
                        <?php echo $post->title; ?>
                    </a>
                </h3>
                <div class="intro">
                    <?php echo $post->intro; ?>        
                </div>
                
                <p class="more">
                    <a href="<?php echo $this->url(array('slug' => $post->slug), 'post_read'); ?>">
                        <?php echo $this->date($post->posted); ?>
                    </a>
                </p>
            </li>
            
            <?php $y += $col; ?>
            <?php endwhile; ?>
        
        </ul>    
        
        <?php endfor; ?>
    
</div>